<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>{$title}</title>
</head>
<body>
<if condition="!empty($cateRow)">
    <php>
        function showTree($data) {
            echo '<ol class="dd-list">';
            foreach ($data as $key => $val) {
                echo '<li class="dd-item item-orange " data-id="'.$val[id].'">';
                    echo '<div class="dd-handle">'.$val['classification'];
                        echo '<div class="pull-right action-buttons">';
                            echo '<a class="green" data-toggle="modal" href="'.U('Admin/Goods/addCate/?pid='.$val[pid]).'" data-target="#myModal">';
                                echo '<i class="ace-icon fa fa-plus-circle bigger-130"></i></a>';
                            echo '<a class="blue" data-toggle="modal" href="'.U('Admin/Goods/addCate/?id='.$val[id]).'" data-target="#myModal"><i class="ace-icon fa fa-pencil bigger-130"></i></a><a class="red" href="#"><i class="ace-icon fa fa-trash-o bigger-130"></i></a></div></div>';
                    if (!empty($val['childs'])) {
                        showTree($val['childs']);
                    }
                echo '</li>';
            }
            echo '</ol>';
        }
        showTree($cateRow);
    </php>
</if>
</body>
</html>